{extend name="Layout/layout"}
{block name="body_content"}
<!--面包屑导航-->
<ol class="breadcrumb">
    <li><a href="#">首页</a></li>
    <li><a href="#">会员</a></li>
    <li class="active">会员管理</li>
</ol>
<!--/面包屑导航-->
<!--表格头部工具栏-->
<nav class="navbar navbar-default">
    <div class="container-fluid">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="#">工具栏</a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <button type="button" class="btn btn-default navbar-btn xsui-btn-add-dialog" data-url="{:url('add_user')}">新增</button>
            <button type="button" class="btn btn-danger navbar-btn xsui-btn-multi-remove" data-url="{:url('User/delete','id=varkey')}">批量删除</button>
            <button type="button" class="btn btn-success navbar-btn xsui-btn-refresh">刷新</button>
            <form class="navbar-form navbar-right">
                <div class="form-group">
                    <input type="text" name="word" class="form-control" placeholder="用户名">
                </div>
                <button type="submit" class="btn btn-default">搜索</button>
            </form>
        </div>
    </div>
</nav>
<!--/表格工具栏-->
<!--表格-->
<table class="table table-condensed table-bordered table-striped table-hover">
    <thead>
        <tr>
            <th class="xsui-cell-multi-check" style="width:20px;"><input type="checkbox" /></th>
            <th style="width:30px;">#</th>
            <th>用户名</th>
            <th>手机号码</th>
            <th>电子邮件</th>
            <th>登录次数</th>
            <th>登录IP</th>
            <th>登录时间</th>
            <th>状态</th>
            <th>创建时间</th>
            <th>操作</th>
        </tr>
    </thead>
    <tbody>
        {foreach $list as $key=>$vo}
        <tr data-key="{$vo.id}">
            <td class="xsui-cell-multi-check"><input type="checkbox" /></td>
            <td>{$key+1}</td>
            <td class="xsui-nowrap" title="{$vo.user_name}"><a href="{:url('user_edit','id='.$vo['id'])}" class="xsui-btn-edit-dialog" data-id="{$vo.id}" title="编辑 {$vo.user_name}">{$vo.user_name}</a></td>
            <td class="xsui-nowrap" title="{$vo.mobile}">{$vo.mobile}</td>
            <td class="xsui-nowrap" title="{$vo.email}">{$vo.email}</td>
            <td class="xsui-nowrap" title="{$vo.login_count}">{$vo.login_count}</td>
            <td class="xsui-nowrap" title="{$vo.login_ip}">{$vo.login_ip}</td>
            <td class="xsui-nowrap" title="{$vo.login_time}">{$vo.login_time}</td>
            <td class="xsui-cell-status"><a href="{:url('change_status','status=varstatus&id='.$vo['id'])}" data-value="{$vo.status}" title="点击隐藏" class="xsui-success"><i class="glyphicon glyphicon-ok"></i></a></td>
            <td class="xsui-nowrap">{$vo.create_time}</td>
            <td class="xsui-action-td">
                <div class="dropdown">
                    <button class="btn btn-default btn-sm dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">操作<span class="caret"></span></button>
                    <ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
                        <li><a href="{:url('edit_user','id='.$vo['id'])}" class="xsui-btn-edit-dialog" data-id="{$vo.id}" title="编辑 {$vo.user_name}"><span class="glyphicon glyphicon-edit"></span>编辑</a></li>
                        <li><a href="{:url('User/delete','id='.$vo['id'])}" class="xsui-btn-remove" data-id="{$vo.id}" title="删除 {$vo.user_name}"><span class="glyphicon glyphicon-remove"></span>删除</a></li>
                    </ul>
                </div>
            </td>
        </tr>
        {/foreach}
    </tbody>
</table>
<!--/表格-->
<!--分页-->
<nav >
    {$list->render()}
</nav>
<!--/分页-->
<!--对话框-->
<div class="modal fade bs-example-modal-lg" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content">
            ...
        </div>
    </div>
</div>
<!--/对话框-->
<script src="/skin/theme/sueuix5/ctrl/layout/layout.js"></script>
<script src="/skin/theme/sueuix5/plugin/jquery-togglelink-1.0/jquery-togglelink-1.0.min.js"></script>
<script type="text/javascript">
    // 2016-12-28
    $('.dropdown-toggle').dropdown();
    // 2016-12-29
    $(document).ready(function () {
        layout_ui_init();
    })
</script>
{/block}